#include <54func.h>
void handler(int signum){
    printf("Before,signum = %d\n",signum);
    sleep(3);
    printf("After,signum = %d\n",signum);
}
int main()
{
    signal(SIGINT,handler);
    //printf("hello");//signal不会阻塞
    char buf[4096] = {0};
    read(STDIN_FILENO,buf,sizeof(buf));
    
    printf("buf = %s\n",buf);
    //  while(1)
  //  {
  //      sleep(1);
  //  }
    return 0;
}
